<!--  -->
<template>
  <van-dialog :show="showModel" title="" :showConfirmButton="false" class="tips-model">
    <CloseCircleOutlined @click="handleModelClose" />
    <div class="title">{{ title }}</div>
    <!-- <div class="content" v-html="content"></div> -->
    <div class="content">{{ content }}</div>
    <van-button type="primary" loading-text="" class="login-btn" @click="handleClickBtn">
      {{ btnText }}</van-button
    >
  </van-dialog>
</template>

<script lang="ts">
import { CloseCircleOutlined } from '@ant-design/icons-vue'
import { defineComponent } from 'vue'
export default defineComponent({
  components: {
    CloseCircleOutlined
  },
  props: {
    showModel: {
      default: false,
      type: Boolean
    },
    handleClickBtn: {
      default: () => ({}),
      type: Function
    },
    btnText: {
      default: '确定',
      type: String
    },
    content: {
      default: '',
      type: String
    },
    title: {
      default: '提示',
      type: String
    }
  },
  emits: ['update:showModel'],
  setup(props, context) {
    function handleModelClose() {
      context.emit('update:showModel', false)
    }
    return { handleModelClose }
  }
})
</script>
<style lang="scss">
.tips-model {
  padding: 32px 24px;

  .content {
    max-height: 169px;
    overflow-x: hidden;
    overflow-y: auto;
    font-size: 14px;
    line-height: 24px;
    color: rgba(0, 0, 0, 0.85);
  }

  .van-button {
    display: block;
    width: 100%;
    height: 40px;
    margin: 14px 0;
    background: #f1442f;
    border-radius: 20px;
  }

  p {
    font-size: 13px;
    color: rgba(0, 0, 0, 0.5);
    text-align: center;
  }

  .login-btn {
    font-size: 15px;
    letter-spacing: 8px;
    border: none;
    margin: 15px auto 0;
  }

  .login-code {
    color: #f1442f;
    background: #fff;
    border: 1px solid #f1442f;
    border-radius: 20px;
  }

  .yzm {
    display: flex;
    justify-content: space-between;
    align-items: center;

    .code-input {
      width: 157px;
    }

    span {
      width: 105px;
      height: 40px;
      font-size: 15px;
      line-height: 40px;
      color: #f1442f;
      text-align: center;
      border: 1px solid #f1442f;
      border-radius: 20px;
    }
  }

  .anticon-close-circle {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 20px;
    height: 20px;
    line-height: 20px;
    color: #b3b3b3;
    text-align: center;
  }

  .phone-input {
    width: 100%;
    margin-bottom: 14px;
  }

  .title {
    margin-bottom: 16px;
    font-size: 17px;
    font-weight: 500;
    color: #000;
    text-align: center;
  }

  input {
    display: block;
    height: 40px;
    padding: 10px 17px;
    background: rgba(0, 0, 0, 0.1);
    border: none;
    border-radius: 20px;
    outline: none;
    box-sizing: border-box;

    &::placeholder {
      color: rgba(0, 0, 0, 0.5);
    }
  }
}
</style>
